4.3 – Non-Ideal Gas Laws


4.3.0 – Learning Objectives

By the end of this section you should be able to:

  1. Understand why most gases don’t behave ideally.
  2. Use equations of the state for non-ideal gases.
  3. Find and use the compressibility factor.

4.3.1 – Introduction

Before this course, you most likely have used the ideal gas law, \(P V = n R T\), but this equation of state is not very accurate in describing gases in the real world. This is because the ideal gas law assumes that gas particles are infinitesimal points of mass and that these points of mass do not interact with each other. This is a flaw in the ideal gas law and causes the ideal gas law to be close to the truth only when pressures are relatively low or the gases are noble gases, especially Helium.

That is why equations of state for non-ideal gases are crucial for calculating how real gases. In this section, we will focus on the compressibility factors to correct the ideal gas law and the viral equation, the Van der Walls equation, and the Soave-Redlich-Kwong equation.


4.3.2 – Equations of the State for Non-Ideal Gases

Critical temperature, \(T_c\), and critical pressure, \(P_c\), are the temperature and pressure of a species at its critical point. These two properties often tell us how well or poorly the ideal gas law is for describing the species.

The Viral Equation of State

The viral equation of state is an expression of the quantity \(P \hat{V} / R T\) as a power series in the inverse of specific volume:

\[\frac{P \hat{V}}{R T} = 1 + \frac{B}{\hat{V}} + \frac{C}{\hat{V}^2} + \frac{D}{\hat{V}^3} + ...\]

Where B, C, and D are the second, third, and fourth virial coefficients respectively. These coefficients are functions of temperature. As of right now, estimating the coefficients beyond B is very difficult so we use a truncated version:

\[\frac{P \hat{V}}{R T} = 1 + \frac{B}{\hat{V}}\]

To solve the viral equation of state we must:

  1. Look up the critical temperature, \(T_c\), the critical pressure, \(P_c\), and the Pitzer acentric factor, \(\omega\). Pitzer acentric factor is a constant that reflects the geometry and polarity of a molecule.

  2. Calculate the reduced temperature, \(T_r = T / T_c\).

  3. Estimate B using:

    \[B_0 = 0.083 - \frac{0.422}{T^{1.6}_r}\]
    \[B_1 = 0.139 - \frac{0.172}{T^{4.2}_r}\]
    \[B = \frac{R T_c}{P_c} (B_0 + \omega B_1)\]
  4. Substitute B back into the viral equation of state.

Van der Waals Equation of State

The Van der Waals equation of state is the first cubic equations of state. Cubic equations of state are equations that when expanded are third-order equations for specific volume. The equation is:

\[P = \frac{R T}{ \hat{V} - b} - \frac{a}{\hat{V}^2}\]

where

\[a = \frac{27 R^2 T^2_c}{64 P_c}\]
\[b = \frac{R T_c}{8 P_c}\]

The \(\frac{a}{\hat{V}^2}\) term accounts for the attractive and repulsion forces between molecules. \(b\) is the correction for the volume occupied by the molecules themselves

Soave–Redlich–Kwong Equation of State

The Soave–Redlich–Kwong (SRK) equation of state is more complex yet is remarkably robust in describing a variety of systems. The equation is:

\[P = \frac{R T}{ \hat{V} - b} - \frac{\alpha a}{\hat{V} (\hat{V} + b)}\]

where

\[a = 0.42747 \frac{(R T_c)^2}{P_c}\]
\[b = 0.08664 \frac{R T_c}{P_c}\]
\[\alpha = \big[1 + m \big( 1 - \sqrt{T_r} \big) \big]^2\]
\[T_r = \frac{T}{T_c}\]
\[m = 0.48508 + 1.55171 \omega - 0.1561 \omega^2\]

4.3.3 – Compressibility Factor

The compressibility factor of a gas is defined as:

\[z = \frac{ P \hat{V} }{R T}\]

When \(z = 1\), the gas behaves ideally. The amount \(z\) differs from 1 is a measurement of how non-ideal the gas is.

A method used to estimate \(z\), since every type of gas has different \(z\) factors at the same pressure and temperature, is:

  1. Look up the critical temperature, \(T_c\), and critical pressure, \(P_c\), of the species.
  2. Calculate the reduced temperature, \(T_r = \frac{T}{T_c}\) and reduced pressure, \(P_r = \frac{P}{P_c}\).
  3. Look up the values of \(z\) on a generalized compressibility chart, which plots \(z\) versus \(P_r\).

This method of estimating \(z\) is the empirical law of corresponding states. The reduced temperature and pressure provide a measure of the gas’s proximity to its critical state. The closer \(T_r\) and \(P_r\) are to 1, the closer the gas is to its critical state. This suggests that a plot of \(z\) verses \(T_r\) and \(P_r\) will be approximately the same for all substances. This type of plot is called a **generalized compressibility chart**.

Each line represents a different \(T_r\) while \(P_r\) is the x-axis. The y value of intersection between the \(T_r\) and \(P_r\) is the compressibility factor.


4.3.4 – Problem Statement

Question

The pressure gauge on a \(20.0 \space m^3\) tank of nitrogen at \(25 ^{\circ} C\) reads \(10 \space \text{bar}\). The critical temperature, \(T_c\), of nitrogen is \(-146.9 ^{\circ} C\). The critical pressure, \(P_c\), of nitrogen is \(33.5 \space \text{atm}\). The Pitzer acentric factor, \(\omega\), is \(0.039\). What is the mass, in \(kg\), of nitrogen in the tank using the:

  1. Ideal gas law?
  2. Truncated viral equation of state?

Is it reasonable to use an equation of state other than the ideal gas law in this case? Why/why not?

Answer

a) Ideal gas law

Since we know that the ideal gas law is \(P V = n R T\), we can solve for n. First, everything needs to be converted into SI units.

\[P = 10 \space bar \times \frac{100,000 \space Pa}{1 \space bar} = 1,000,000 \space Pa\]
\[V = 20 \space m^3\]
\[T = 25 ^{\circ} C + 273.15 = 298.15 \space K\]

next we can solve for n

\[P V = n R T\]
\[n = \frac{P V}{R T}\]
\[n = \frac{(1,000,000 \space Pa)(20 \space m^3)}{\big(8.314 \frac{ m^3 \cdot Pa}{mol \cdot K} \big) \big(298.15 \space K \big)} = 8,068 \space moles\]

now we must convert moles of nitrogen into mass.

\[m = n \times MW = 8,068 \space moles \times 28.00 \space g/mole = 225,914 \space g \times \frac{1 \space kg}{1000 \space g}\]
\[m = 225.9 \space kg\]

b) Viral equation of state

Since we know the viral equation of state is

\[\frac{P \hat{V}}{R T} = 1 + \frac{B}{\hat{V}}\]

where

\[\hat{V} = \frac{V}{n}\]
\[B = \frac{R T_c}{P_c} (B_0 + \omega B_1)\]
\[B_0 = 0.083 - \frac{0.422}{T^{1.6}_r}\]
\[B_1 = 0.139 - \frac{0.172}{T^{4.2}_r}\]

we can solve for \(n\). First let’s solve for \(B_0\). We know that

\[T_r = \frac{T}{T_c}\]
\[T_r = \frac{298.15 \space K}{126.25 \space K} = 2.362\]
\[\therefore \space B_0 = 0.083 - \frac{0.422}{T^{1.6}_r} = 0.083 - \frac{0.422}{(2.362)^{1.6}} = -0.0237\]

next let’s solve for \(B_1\)

\[B_1 = 0.139 - \frac{0.172}{T^{4.2}_r} = 0.139 - \frac{0.172}{(2.362)^{4.2}} = 0.1343\]

after this we can solve for \(B\)

\[B = \frac{R T_c}{P_c} (B_0 + \omega B_1) = \frac{\big(8.314 \frac{ m^3 \cdot Pa}{mol \cdot K} \big) \big( 126.25 \space K \big)}{3393550 \space Pa } (-0.0237 + (0.039) \cdot (0.1343))\]
\[B = -5.71 \times 10 ^{-6}\]

Finally, we can solve for \(n\)

\[\frac{P V}{n R T} = 1 + \frac{B n}{V}\]
\[\frac{P V}{R T} = n + \frac{B n^2}{V}\]
\[\frac{B n^2}{V} + n - \frac{P V}{R T} = 0\]
\[-2.86 \times 10 ^{-7} \space n^2 + n - 8068.35 = 0\]
\[n = \frac{-b \pm \sqrt{b^2 - 4 \cdot a \cdot c}}{2 \cdot a} = \frac{-1 \pm \sqrt{1 - 4 \cdot (-2.86 \times 10 ^{-7}) \cdot (- 8068.35)}}{2 \cdot (-2.86 \times 10 ^{-7})}\]
\[n = 8,087 \space moles, 3,488,416 \space moles.\]

Since we have a quadratic, we get 2 answers. Since 8,087 moles is much more reasonable than 3,488,416, we will assume that is the correct answer. Finally, we can solve for the mass

\[m = n \times MW = 8,087 \space moles \times 14.00 \space g/mole = 226,436 \space g \times \frac{1 \space kg}{1000 \space g}\]
\[m = 226.4 \space kg\]

No, it is not reasonable to use an equation of state other than the ideal gas law. This is because the $ N_2 $ is a relatively inert gas. It also is relatively small in both mass and volume. This makes the ideal gas assumption close to the truth. You can see the proof in our calculated masses. After significant figures, the masses are almost the same.

Answer Using Python

One of the best things about python is the nearly limitless libraries avaible to use. To solve this problem we are going to use the Thermo library made by Caleb Bell. By clicking on his name, you can find his github page and discover other great projects he is working to make python more useful for chemical engineers.

We must first download the thermo library.

In [1]:
!pip install thermo --user
Requirement already satisfied: thermo in c:\users\said zaid-alkailani\appdata\roaming\python\python36\site-packages
Requirement already satisfied: scipy in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from thermo)
Requirement already satisfied: coolprop in c:\users\said zaid-alkailani\appdata\roaming\python\python36\site-packages (from thermo)
Requirement already satisfied: pandas in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from thermo)
Requirement already satisfied: fluids in c:\users\said zaid-alkailani\appdata\roaming\python\python36\site-packages (from thermo)
Requirement already satisfied: python-dateutil>=2 in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from pandas->thermo)
Requirement already satisfied: pytz>=2011k in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from pandas->thermo)
Requirement already satisfied: numpy>=1.7.0 in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from pandas->thermo)
Requirement already satisfied: six>=1.5 in c:\users\said zaid-alkailani\anaconda3\lib\site-packages (from python-dateutil>=2->pandas->thermo)

Now we need to import the data

In [2]:
from thermo.chemical import Chemical

Now lets apply the data from this library

In [3]:
V = 20
rho = Chemical('nitrogen', T=298.15, P=1E6).rho
mass_N2 = V*rho

print("The mass of Nitrogen in the tank is ", mass_N2,"kg")
The mass of Nitrogen in the tank is  226.4052055389342 kg

As you can see, the mass of the nitrogen in the tank is \(226.4 \space kg\) which is very similar to the value we got from the viral equation of state.

Citation

Caleb Bell (2016). thermo: Chemical properties component of Chemical Engineering Design Library (ChEDL) https://github.com/CalebBell/thermo.

In [ ]: